package dst1.validator;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

@Constraint(validatedBy = ComputerCPUConstraintValidator.class)
@Target({ METHOD, FIELD })
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
public @interface CPU {
    String message() default "CPU count must between 4 and 8";
    
    Class<?>[] groups() default {};
    
    Class<? extends Payload>[] payload() default {};
 
    int min() default 1;

    int max() default 1;
}
